The getStopPrice method returns order's stop price.
var getStopPrice();
This method returns stop price as a floating value.
The following example demonstrates the use of getStopPrice() method.
function start()
{
//retrieve account's open orders
var account = getAccount();
var openOrders = account.getOrders();
//loop through all orders
for(var i = 0; i < openOrders.length, i++)
{
var order = openOrders[i];
if(order.getOrderType() == ORDERTYPE_STOP || order.getOrderType() == ORDERTYPE_STOPLIMIT)
{
//get stop Price
var stopPrice = order.getStopPrice();
}
}
//proceed further...
}
Copyright © 2006-2009 ActiveTick LLC